<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .outer {
      width: 100%;
      height: 200px;
      border: 1px solid red
    }

    /* 过渡约束 */
    .inner {
      /* width: 200px; */
      /* width: auto; */
      height: 200px;
      background-color: blue;
      margin: 0 200px;
    }
  </style>
</head>

<body>
  <div class="outer">
    <div class="inner"></div>
  </div>
</body>

</html>